package com.gxa.eshops.admin.entity.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * <p>
 * 商品表
 * </p>
 *
 * @author wangpeng
 * @since 2022-07-11
 */
@Data
@TableName("tb_goods")
@ApiModel(value = "Goods对象", description = "商品表")
public class GoodsVo implements Serializable {

    @ApiModelProperty("商品id，同时也是商品编号")
    @TableId(value = "goods_id", type = IdType.AUTO)
    private Long goodsId;

    @ApiModelProperty("商品标题")
    private String goodsTitle;

    @ApiModelProperty("商品卖点")
    private String sellPoint;

    @ApiModelProperty("商品价格")
    private BigDecimal goodsPrice;

    @ApiModelProperty("库存数量")
    private Integer goodsNum;

    @ApiModelProperty("商品条形码")
    private String goodsBarcode;

    @ApiModelProperty("商品图片")
    private String goodsImage;

    @ApiModelProperty("所属类目，叶子类目")
    private Long cateId;

    @ApiModelProperty("商品状态，1-正常，2-下架，3-删除")
    private Integer status;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime goodsCreated;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime goodsUpdated;


}
